<style scoped lang="less">


</style>
<template>
<div>
    <Card :bordered="false" dis-hover>
        <p slot="title">关联</p>
        
		<Row :gutter="20">
			<Col span="6">
				<Input v-model="search.number" placeholder="发票号码" ></Input>
			</Col>
			<Col span="12">
				<DatePicker type="datetimerange" format="yyyy-MM-dd HH:mm" 
				placeholder="开票日期" v-model="search.date" style="width:100%;"></DatePicker>
			</Col>
			<Col span="6">
				<Button type="primary" icon="ios-search">搜索</Button>
			</Col>
		</Row>
			
        <div style="margin-top:20px;">
       		<Table highlight-row ref="currentRowTable" :columns="columns3" :data="data1"></Table>
       	</div>
       	<!-- <div style="margin-top:20px;">
       		<div style="float:left;">
       			<Button type="primary" icon="ios-cloud-upload-outline">全部上传</Button>
       			<Button type="primary" icon="arrow-up-a">上传</Button>
       			<Button type="primary" icon="android-remove">不上传</Button>
       			<Button type="primary" icon="arrow-down-a">全部导出</Button>

       		</div>
       		<Page  show-total :page-size="pageParams.pageSize"	:total="pageParams.total" 
       		show-total @on-change="changePage" style="float:right;"></Page>
       	</div> -->
       	<div style="margin-top:20px;">
       		
       		<Page  show-total :page-size="pageParams.pageSize"	:total="pageParams.total" 
       		show-total @on-change="changePage" ></Page>
       	</div>
        
    </Card>
    <library-edit></library-edit>
</div>	
</template>
<script>
import LibraryEdit from "../Module/libraryedit.vue";
export default {
	components:{LibraryEdit},
	//name:"出库单开票",
	data (){
		return {
			search:{type:'',date:'',num:'',number:'',key:'',bj:''},
			colors:['default','yellow','blue'],texts:['待发送','不上传','已发送'],
			data1:[
				{id:1323039593,fpnumber:13302,gfnumber:1323039593,gfname:'传世',
				price:45.2,sprice:1,date:'2017-12-21 7:32',money:46.2,state:1},
				{id:1323039593,fpnumber:13302,gfnumber:1323039593,gfname:'传世',
				price:45.2,sprice:1,date:'2017-12-21 7:32',money:46.2,state:2},
				{id:1323039593,fpnumber:13302,gfnumber:1323039593,gfname:'传世',
				price:45.2,sprice:1,date:'2017-12-21 7:32',money:46.2,state:0},
				{id:1323039593,fpnumber:13302,gfnumber:1323039593,gfname:'传世',
				price:45.2,sprice:1,date:'2017-12-21 7:32',money:46.2,state:2}
			],columns3:[{
				type: 'selection',width:60,align:'center'
			},{
				title:'发票代码',key:'id',
			},{
				title:'发票号码',key:'fpnumber'
			},{
				title:'发票金额',key:'price'
			},{
				title:'开票日期',key:'date',width:130
			},{
				title:'操作',render:(h,params)=>{
					return (
						<div>
							<i-button type="ghost" 
        					 on-click={ ()=> this.show(params) }>关联</i-button>
						</div>
					)
				}
			},],
			pageParams:{pageSize:10,total:50}
		}
	},methods:{
		changePage (pageNum){
			this.pageParams.pageNum = pageNum;
     		this.getdata();
		},getdata(){
			
		},show(){
			console.log('a')
			this.$bus.emit('bus_libraryedit')
		}
	}
}
</script>